import { http } from "@/utils/http";
import type { HttpResult } from "@/utils/http/types";

export function queryPage(params: object) {
  return http.request<HttpResult>("get", "/admin/def/table/data/get/table", {
    params: params
  });
}

export function queryList(params: object) {
  return http.request<HttpResult>("get", "/admin/def/table/data/get/list", {
    params: params
  });
}

export function importData(params: object) {
  return http.request<HttpResult>("post", "/admin/def/table/data/import", {
    data: params
  });
}

export function downloadImportError(params: object) {
  return http.request<BlobPart>("post", "/admin/def/table/data/import/error", {
    data: params,
    responseType: "blob"
  });
}
